<form class="form-horizontal" ng-init="dvm.init()" ng-submit="dvm.ok(dvm.parsable)" novalidate>
  <div class="modal-header">
    <button type="button" class="close" ng-click="dvm.cancel()">&times;</button>
    <h4 class="modal-title">编辑【{{dvm.typeName}}】文本</h4>
  </div>
  <div class="modal-body">
    <div class="form-group">
      <div class="col-sm-12" ng-class="{'x-full-screen x-frame': dvm.fullScreen}">
        <div class="x-editor">
          <pre id="doc-editor" style="height:500px"></pre>
        </div>
      </div>
    </div>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-default" ng-click="dvm.format()">
      <i class="fa fa-code"></i> 格式化</button>
    <button type="submit" class="btn btn-default" ng-disabled="!dvm.parsable">
      <i class="fa fa-check"></i> 确定</button>
    <button type="button" class="btn btn-default" ng-click="dvm.cancel()">
      <i class="fa fa-times"></i> 取消</button>
  </div>
  <script type="text/ng-template" id="doc-editor-tools">
    <div class="x-editor-tool">
      <div class="x-toolbar btn-group">
        <button type="button" class="btn btn-default btn-xs" ng-click="dvm.fullScreen = !dvm.fullScreen"
            title="{{dvm.fullScreen ? '退出全屏' : '全屏'}}">
          <i class="fa" ng-class="{'fa-compress': dvm.fullScreen, 'fa-expand': !dvm.fullScreen}"></i></button>
      </div>
    </div>
  </script>
</form>
